Computer graphics

ABSTRACT

A method of electrically generating a line comprising: 
     a) providing first shape signals representative of at least part of a selected implement shape and second shape signals representative of a cross-sectional portion of said implement shape; 
     b) determining first and second positions between which a line is to be generated; and 
     c) generating said line utilizing said first shape signals in the region of said first and second points and said second shape signals for creating a segment in a region between said first and second points.

This invention relates to computer graphics and is particularlyconcerned with computer graphic systems in which lines may be drawn asin painting or sketching.

Conventional computer graphic systems comprise drafting means, such asan electronic tablet and stylus with which an artist may carry outdrawing and painting movements, a computer system which receives signalsfrom the drafting means representing the movements made by the artist,one or more frame stores for storing data representing the lines drawnor painted by the artist and output means for reading out the contentsof the frame stores, for example for display on a VDU. Each frame storecomprises a matrix of pixels with different pixels in the matrixcorresponding to respective different positions on the tablet. Thus,placing the stylus at a particular position on the tablet designates acorresponding pixel in the frame store. In order to simulate a lineproduced by an artist's implement such as a particular form of paintbrush or a pencil, it is known to process the patch of pixelssurrounding the designated pixel by combining the data representing thecolour and/or intensity of the line to be drawn with the data already inthe frame store representing the background. This processing utilises aset of coefficients, of which there is a respective one for eachdifferent pixel in the patch, chosen so that the new data is combinedwith the old in a manner which simulates the chosen implement. Thus, asthe stylus moves across the tablet, the "patch" moves across the framestore and each frame store pixel which falls beneath the patch isprocessed a number of times dependent upon the size of the patch and thedistance moved per iteration. A problem with the above described processis that since pixel which falls beneath the patch is processed a numberof times, substantial computing power is needed and the process isnecessarily somewhat slow.

In one aspect, the invention alleviates this problem 20 by providingmeans to perform a first step in which data representing the line drawnis stored separately from data representing the background and means toperform a second step in which the stored data representing the linedrawn in the background are combined.

Another problem with the prior art system described above arises due tothe fact that the stylus position relative to the table is sensed atfixed time intervals. The distance between successive sensed positionsof the stylus will therefore vary dependent upon the speed of movementof the stylus. The patch of pixels which is processed is, as explained,that surrounding the designated pixel in the frame store correspondingto the sensed brush position. The line which is drawn, therefore, isessentially made up of a series of overlapping patches of pixels orblobs the degree of overlap reduces as the speed of stylus movement isincreased. Thus, for high stylus speeds, the line produced will bepercieved as having wavey edges or appears to consist of discrete blobsof paint. To avoid this, the stylus must be moved relatively slowly.

With a view to solving this problem, a further aspect of the inventionprovides means to compute data representing a substantially continuousline drawn between spaced apart detected position of the drafting meansand to store said computed data.

In the prior art system described above, the coefficients utilised forprocessing the pixels in the patch, have a constant relationship to eachother after the artist has selected a particular implement. Inevitably,therefore, the line drawn does not truely represent strokes made with areal artists implement since variation arises along the stroke with areal implement, for example, due to the amount of paint remaining on thebrush reducing as the stroke proceeds. One proposal for dealing withthis problem has been made in the article entitled "Hairey Brushes" byStrassmann at pages 225 to 232 in the proceedings of SIGGRAPH '86, Vol.20, No. 4, 1986. In this paper, Strassman proposes that the individualbristles of a brush should be individually represented by values whichare recomputed as the stroke proceeds so as to represent the decreasingamount of paint remaining on the respective bristles of a real brush asit is drawn across paper. The problem with this proposal is that itrequires substantial computing power and is, therefore, in practicerelatively slow.

With a view to solving this problem, a further aspect of the inventioncomprises means for storing a set of data representing the texture of astroke for different positions therealong and means for utilising dataselected from said set in providing data representing a stroke drawnwith an electronic drafting means. The set of texture representing datamay, for example, be derived by optically scanning and digitising astroke painted with a real artists implement or, alternatively, may becomputed.

Another aspect of the invention is concerned with providing morerealistic effects and special effects. In accordance with this aspect,an embodiment of the invention comprises means for sensing the angle oftilt of a drafting means and means for adjusting data in responsethereto for affecting an image to be produced. Preferably, the angle oftilt is used to change the size and/or shape of a shape signalrepresentative of the distribution of paint or other medium produced bya drafting implement. For example, the effect of tilting an air brushmay be replicated.

A further aspect of the invention concerns a configuration, preferablyimplemented in hardware, for obtaining increased flexibility.

In accordance with one preferred embodiment of this aspect of theinvention, a graphics system is provided with storage means for storingdata on a pixel-by-pixel basis, means for providing output signalsderived from said pixels, means for providing strength signals forcombination with said output signals for adjusting the value of theoutput signal, and means for varying the values of the strength signalsas a function of the addresses of the pixels from which the outputsignals are derived.

In another embodiment of this aspect of the invention, a graphics systemis provided with means operable to store shape signals representative ofa drafting implement, means for storing texture signals representativeof texture of an image or line to be created, and means for combiningthe shape signals and the texture signals for producing signals fromwhich the image may be derived.

In a further embodiment according to this aspect of the invention, agraphics system includes a graphics engine comprising means for storingshape signals representative of a drafting implement, means for storingtexture signals representative of texture produced by an implement,means for providing strength signals which may vary on a pixel-by-pixelbasis as said shape signals and said texture signals are read, and meansfor combining the shape signals with the texture signals and with thestrength signals.

The invention is described further by way of example with reference tothe accompanying drawings in which:

FIG. 1 is a block diagram of a computer graphics system in which theinvention is embodied;

FIG. 2 is a diagrammatic perspective view of a tablet and stylusincluded in the system of FIG. 1;

FIG. 3 is a block diagram of a graphics engine included in the system ofFIG. 1;

FIG. 4 is a diagrammatic-representation of part of the graphics engineof FIG. 3 showing more detail;

FIG. 5 is a block diagram of another part of the graphics engine shownin FIG. 3;

FIG. 6 is a diagram of an example of a brush shape which may be used inthe system of FIGS. 1 to 5;

FIG. 7 illustrates diagrammatically a line drawn with a brush of theshape shown in FIG. 6;

FIGS. 8 to 10 show respectively three segmental brush shape portionsutilised accordance with a preferred aspect of the invention for thecreation of a line as shown in FIG. 7 to simulate painting with a brushof shape shown in FIG. 6;

FIG. 11 is a diagram for illustrating creation of a painted line inaccordance with a preferred aspect of the invention;

FIG. 12 is a diagram illustrating the steps performed by the system increating a line as shown in FIG. 11;

FIG. 12A shows a part of FIG. 12 to an enlarged scale;

FIG. 13 to 26 are diagrams illustrating examples of operations that maybe performed in accordance with the invention.

HARDWARE

With reference to FIG. 1, a graphics computer system in accordance withthe preferred embodiment of the invention comprises a general purposehost computer 2, a keyboard 4 for inputting instructions to the computer2, an electronic tablet and stylus assembly 6 for drawing and paintingand also for inputting instructions to the computer 2, a graphics engine8 which operates under control of the computer 2 and a TV monitor 10 fordisplaying pictures created or modified by the graphics engine 8 inresponse to data from the computer 2.

As is conventional, the host computer 2 comprises a CPU and memory whichmay include hard disc, floppy disc, tape and RAM, for containingprogrammes and other data. Menus and instructions may be displayed onthe monitor 10, as is conventional, for assisting in operation of thesystem.

As shown in FIG. 2, the tablet and stylus assembly 6 comprises a tablet14, a stylus 16 connected by cable 18 to an electrical unit 20 which isin turn connected to the host computer 2 by a cable 22. Tablet 14comprises an active area 24 over which the stylus 16 may be moved, itsposition at any instant being defined in terms of an XY co-ordinatesystem having its origin 26 at a corner of the area 24 as shown in FIG.2. An axis perpendicular to the plane of the XY co-ordinate system isdesignated as the Z-axis. The electrical unit 20 outputs a number ofsignals to the host computer 2 representing respectively the XYco-ordinates of the position of the stylus, the stylus tip pressure, thestylus tilt as projected on the XZ plane (not shown), the stylus tilt asprojected on the YZ plane (not shown), and the rotational orientation ofthe stylus about its own axis 32 as represented by circular arrow 34 inFIG. 2. An angle u between the Z axis and the stylus axis 32 and anangle v between the X axis and the projection of the stylus axis 32 ontothe XY plane are shown in FIG. 2. The angles u and v are utilised incertain preferred embodiments of the invention to be described and arereadily calculated from the above mentioned signals representative ofthe stylus tilt. The stylus also preferably includes an accelerometerimpulse switch (not shown) for instructing control functions by shakingthe stylus 16.

Tablet and stylus assemblies providing the above features arecommercially available. An example is the MAX digitiser available fromTerminal Display Systems (TDS) Limited of Lower Philips Road, Blackburn,BB1 5TH, England.

With reference to FIG. 3, the graphics engine 8 comprises two framestores or screen memories 36, 38, memory 36 being for storing a mainimage to be displayed on monitor 10 and memory 38 being for storing afurther image to be overlayed on the image stored in memory 36 duringdisplay. For this purpose, the ouputs of the memories 36 and 38 aresupplied to a video mixing unit 40 which outputs a video signal obtainedby combining the images in the memories 36 and 38. This video signal infact comprises three signals representing respectively the red, greenand blue components of the combined image to be displayed and thesesignals are supplied via an output circuit 42 to the TV monitor 10. Adigital encoder 44 is also provided for providing an alternative digitaloutput when required.

An asynchronously operated input buffer 46 is provided for temporarilystoring images to be supplied to the memories 36, 38 obtained fromexternal means such as a TV camera or video tape recorder. Analogueinput circuitry 48 is provided for receiving signals representing thered, green and blue components of such images and supplying them to thebuffer 46. Digital decoding circuitry 50 is provided for receivingdigital video signals, decoding them and supplying them in RGB format tothe buffer 46.

The graphics engine 8 also includes an input 52 for receiving data fromthe host computer 2. The input 52 is connected to a graphics processor54 which is in turn connected to both memories 36 and 38 and to afurther memory 56. The graphics processor 54 operates in a conventionalmanner in response to signals from the host computer 2 for manipulatingimages contained in the memories 36 and 38 with the assistance of thememory 56 and for carrying out brushing functions with the aid of thetablet and stylus assembly 6. For these purposes, the graphics processorincludes a microprocessor 58 and other conventional hardware which neednot be described in detail. A further processor 60 is provided and iscoupled to the input 52, the memories 36 and 38 and the video mixer 40for controlling the image display functions in a conventional manner.

The hardware contained in the graphics engine 8 as so far described isconventional. An example of a system employing such hardware is the"Pastiche" system manufactured by Electronic Graphics Inc. of 1157-BTriton Drive, Foster City, Calif. 94404, U.S.A.

In accordance with an important aspect of the present invention,however, a novel brush processor 62 is provided and is connected to thegraphics processor 54. Before describing the brush processor in detailthe structure and operation of the memories 36 and 38 and the videomixing circuitry 40 will be further described with reference to FIG. 4.

As shown in FIG. 4, the two memories 36, 38 are identical and compriserespective matrices of pixels diagrammatically indicated at 64 and 66.The pixels are arranged in rows and columns and there are sufficientpixels in each memory to store a complete video frame. The positions ofindividual pixels in each matrix may be defined in terms of an xyco-ordinate system corresponding to the XY co-ordinate system of thetablet 14. Thus, a given position of the stylus 16 on the tablet 14 willcorrespond to a given pixel in each of the memories 36 and 38. As isconventional, however, the tablet and stylus assembly 6 defines thestylus position to sub-pixel resolution so that the XY signals from theassembly 6 designate not only the co-ordinates of the pixel to which thestylus position corresponds but also the position of the stylus withinthat pixel, preferably to a resolution of at least one eighth of thesize of the pixel, typically one sixteenth of the size of the pixel.

Memories 36 and 38 are arranged so that 32 bits may be stored in eachpixel. The memories 36 and 38 may be regarded as organised in layers 36ato 36d and 38a to 38d (or may be physically organised into layers) witheach layer containing eight bits for each pixel as indicated in FIG. 4.Thus, three of the layers 36a, 36b, 36c of the memory 36 containrespectively eight bit data representing the red, green and bluecomponents Rm, Gm, Bm of the main image and three of the layers 38a,38b, 38c, of the memory 38 contain respectively eight bit datarepresenting the red, green and blue components Ro, Go, Eo of theoverlay image. The fourth layers 36d, 38d of the two memories 36, 38contain respectively eight bit data Km,Ko utilised by the video mixerciruit 40 for determining the proportions in which the main and overlayimages are combined and which of the images will be in the foregroundand background respectively when displayed. Thus, the red, green andblue components of the images stored in the pixels of the memories 36and 38 are read-out simultaneously pixel-by-pixel and combined to givered, green and blue display values Rd, Gd and Bd in accordance with thefollowing equations:

    Rd=Rm(1-KoKm)+RoKoKm

    Gd=Gm(1-KoKm)+GoKoKm

    Bd=Bm(1-KoKm)+BoKoKm

The images combined in this way may be displayed and, on command of theoperator, the combined image may, when desired, be fed back undercontrol of the processor 60 from the output of the video mixer 40 to themain screen memory 36, as indicated by line 68 in FIG. 4, for storagetherein in place of the previous main image.

Although, in the above equations for Rd, Gd and Bd, it is assumed thatKo and Km are fractions, these fractions are in practice represented aseight bit numbers and, for convenience, the notation adopted may be suchthat the maximum binary value equivalent to decimal 255 isrepresentative of the minimum value of Ko or Km. In the followingdescription, therefore, the reference to the value Ko or Km being largeshould be taken as a reference to its effect on the mixing process andnot to the actual numerical value stored. In other words, a relatively"large" value of Ko is a value which causes the output of the videomixer to contain a relatively large proportion of the image in memory 38and a relatively "small" value of Ko causes the output of the videomixer to contain a relatively small proportion of the image stored inmemory 38. The same comments apply to the values of Km.

Brush Processor

As shown in FIG. 5, the brush processor 62 comprises work space memories70,71 for receiving and storing image data to be processed, a shapebuffer 72 for storing data defining the shape of an implement notionallybeing used for drawing, a texture buffer 74 for storing data formodifying the texture of the drawn line as represented by data outputfrom the shape buffer 72, a strength controller 76 for modifying thestrength of the data derived from the shape and texture buffers 72, 74and a data pipeline 78 for processing image data stored in work spaces70, 71 with data derived from the shape and texture buffers 72, 74 andthe strength controller 76. Data transceivers 80, 81 and 86 are providedfor entering data into the work spaces 70,71 and tranceivers 82 and 84are prvided for entering data into the buffers 72 and 74. The datatransceiver 86 also outputs data from the pipeline 78. All data entersand leaves the brush processor 62 via the graphics processor 54.Accordingly, the transceivers 82, 84 and 86 of the brush processor 62are coupled to the graphics processor 54.

Reading out of data from the work space 70 or 71 simultaneously and insynchronism with the reading out of data from the shape buffer 72 isachieved by x and y address sequencer circuits 88 and 90 which areconnected to the work space memories 70, 71 through a workspace addresscircuit 92 and to the shape buffer 72 by a shape buffer address circuit94. The sequencers 88, 90 are also both connected to a coefficient ROM96 to select and supply appropriate coefficients to an interpolator 100for performing interpolation on data output from the shape buffer 72prior to application of that data to the pipeline 78. In the preferredembodiment, the interpolator 100 is a CMOS TMC 2246 interpolator chipand each sequencer 88,90 is a CMOS TM2301 Image Resampling Sequencer,these being available from TRW LSI Products Inc. of 4243 Campus PointCourt, San Diego, Calif. 942, U.S.A.

Sequencers 102 and 104, which are similar to sequencers 88 and 90, arerespectively provided for effecting the x and y addressing of data inthe texture buffer 74 via an address circuit 106. The sequencers 102 and104 are also coupled to a ROM 108 for selecting coefficients therefromand applying these coefficients to a further interpolator 110 forperforming interpolation on the data output from the texture buffer 74.The output of the interpolator 110 is supplied to the pipeline 78 via athreshold generator circuit 112 which adds an offset value, selectableby the operator, to the data from interpolator 110. A register 114 isprovided for storing this offset value and a colour register 116 isprovided for defining the colour of the line being drawn or paintedalthough, as will be described, in certain modes of operation of thepreferred embodiment, colour is otherwise defined. A data bus 53 coupledto the processor 54 is provided for supplying data to the sequencers 88,90, 102, 104, the registers 114 and 116 and the strength controller 76.

The data pipeline 78 comprises multipliers 118 and 120 for multiplyingtogether the outputs of the interpolators 100, the threshold generator112 and the strength controller 76. Thus, in operation, the multiplier120 outputs a series of values. These are supplied to a comparator 122which may also receive a series of values obtained by reading the pixelsof workspace 70 in turn. The output of the comparator 122 is applied toa coefficient control circuit 124. The circuit 124 is connected to theoutput of a multiplier 126 which multiplies together the values outputby the multiplier 120 and the pixel values output from work space 70. Amixer and clipper circuit 128 outputs data to the tranceiver 86 inresponse to inputs from the coefficient control circuit 124 and the workspaces 70 and 71. A control register 130 is provided for applyingcontrol signals to the comparator 122, coefficient control circuit 124,multiplier 126 and mixer and clipper 128 so that these circuits can becontrolled to operate in different ways, as will be subsequentlyexplained in detail, depending upon the mode of operation of the systemselected by the operator.

Preferably, the interpolators 100 and 110 output 9 bit data foraccuracy, this subsequently being clipped to 8 bit data in the mixer andclipper 128. It is also preferable that the control register 130 may setthe mixer and clipper 128 into modes in which the inputs to the datapipeline are added to or subtracted from each other.

Various aspects of the hardware configuration of the brush processorillustrated in FIG. 5 form an important aspect of the preferredembodiment of the invention. Various ways in which this hardware may beoperated in accordance with further important aspects of the inventionwill now be described by way of example.

LINE CREATION

The drawing or painting of lines in accordance with a preferred aspectof the invention will first be described on the assumption that thetexture buffer 74, threshold generator 112 and strength controller 76are not used. Thus, the outputs of the threshold generator 112 andstrength controller 76 are held fixed at a value of unity so that thevalues output by interpolator 100 are unchanged by the multipliers 118and 120. In order to carry out painting or drawing of lines, theoperator must select both the paint colour and the brush shape to beused. As is conventional, therefore, the host computer may contain alibrary of brush shapes and colours and contain programmes enabling theoperator to select these in a conventional manner. However, in thepainting and drawing process of this aspect of the invention underdescription, selection of the colour to be used in painting results inthe pixels of the overlay memory 38 being uniformly set to the selectedcolour. That is to say the Ro, Go, Bo values for each pixel in thememory 38 are all set to represent the chosen colour. Also, initially,the Ko values of the pixels in the memory 38 are all set to representzero. The colour register 116 is not used in this aspect of theinvention.

Upon selection of a brush shape, appropriate data is stored in the shapebuffer 72. However, in the process under description, three sets ofshape data are stored, the first representing a start segment of a lineto be drawn, the second representing a cross-section of a middle segmentand the third representing the end segment of the line to be drawn. Byway of example, the selected brush may be of the "bell" shape shown inFIG. 6. This represents a brush which, when brought into contact with apaint receiving surface, would deposit a circular spot of paint withmaximum paint being deposited at the centre of the spot and the amountof paint tailing off towards the edges. Thus, in FIG. 6 the curved threedimensional surface 120 may be considered as representing the intensitydistribution of the pixels used to display the spot on monitor 10, thethree dimensional surface 150 in FIG. 6 being a representation of thepixel values which, as shown, are a maximum at the centre 152 and tailoff to the edges as indicated by curve portion 154. If a brush producingthe distribution as represented in FIG. 6 were brought into contact witha surface to be painted, moved along a straight line and then removedfrom the surface, the resulting distribution of paint may be representedas shown in FIG. 7. As can be seen, the distribution shown in FIG. 7 maybe considered as comprising a start segment 156 at the point where thebrush is brought into contact with the surface to be painted, an endsegment 158 at the point where the brush is removed from the surface tobe painted and an intermediate segment 160 extending between the twosegments 156 and 158. The segment 156 corresponds to half the bell shapeshown in FIG. 6 and is thus as separately illustrated in FIG. 8. Thesegment 158 corresponds to the other half of the bell shape shown inFIG. 6 and thus is as illustrated separately in FIG. 9. The intermediatesegment 160 is of uniform cross-section and, if considered as having alength L, may be considered as a succession of n segments 162 each oflength 1 as illustrated separately in FIG. 10. Thus L=nl. As can be seenfrom examination of FIGS. 8, 9 and 10, the cross-section of the segmentshown in FIG. 10 corresponds to a section through the maximum point 152of the bell shaped surface 150 of FIG. 6. The three sets of data storedin shape buffer 72 upon selection of the brush shape shown in FIG. 6accordingly correspond to the segments 156, 158 and 162 shown in FIGS.8, 9 and 10 respectively.

Having selected colour and brush shape, the operator of the system mayproceed to draw lines using the tablet and stylus assembly 6. For thepurposes of explanation, it will be assumed that the artist draws a line164 as shown in FIG. 11 and that the system detects the stylus atpositions X1,Y1; X2,Y2; X3,Y3 and X4,Y4. Upon detection of the stylus ateach successive position, the system will draw successive straight linesegments in the colour stored in memory 38 utilising the segmentalshapes 156, 158 and 162 stored in shape buffer 72. This involves arotation of the segment 156 of FIG. 8 to the correct angularorientation, a rotation and, effectively, an extrusion of the segment162 shown in FIG. 10, and a rotation of the segment 158 of FIG. 9.

The processing carried out to achieve the above will now be describedwith reference to FIG. 12. The upper part of FIG. 12 showsdiagrammatically a portion of the layer 38d of memory 38 containingpoints X1,Y1 and X2,Y2 with the corresponding segment of the line 164drawn thereon. The middle part of FIG. 12 represents the workspace 70with image data transferred thereto at different stages in the process.The bottom part of FIG. 12 represents the shape buffer 72 with thesegmental shapes 156, 158 and 162 contained therein.

In the first step of the process, the microprocessor 58, contained inthe graphics processor 54, calculates the distance L between the pointsX1,Y1 and X2,Y2 and the angle q which this line makes to the x axis.These calculations are as follows:

    L=√ [(X2-X1).sup.2 +(Y2-Y1).sup.2 ]                 Equation 1

    q=arc tan [(Y2-Y1)/(X2-X1)]                                Equation 2

The graphics processor 54 also, from knowledge of the dimensions of thesegment shown in FIG. 8 and the angle q through which it has to berotated, identifies a rectangle 170 in the memory 38 surrounding pointX1, Y1 and just large enough to contain the rotated segment of FIG. 8when that segment is positioned with the centre of the full brush shape(i.e. the shape of FIG. 6) coincident with point X1,Y1. Havingidentified the rectangle 170, processor 54 then transfers the Ko valuesof the pixels therein to work space 70 in brush processor 62 asindicated by arrow 171 in FIG. 12. Under control of the X and Y shapesequencers 88, 90, the Ko values within the rectangle 170 stored in workspace 70 are read out in turn in a raster scan fashion and, as eachvalue is read out, it is compared in comparator 122 with a correspondingvalue derived from the shape buffer 72 and interpolator 100 undercontrol of the sequencers 88, 90. This derivation can be understood byconsidering a given pixel at address X,Y within the rectangle 170 inwork space memory 70. It can be shown that the corresponding addressSx,Sy within the portion of the shape buffer 72 containing the segmentof FIG. 8 is:

    Sx=(X-X1) cos q-(Y-Y1) sin q                               Equation 3

    Sy=(Y-Y1) cos q+(X-X1) sin q                               Equation 4

These can be rewritten:

    Sx=(Y1 sin q-X1 cos q)+X cos q-Y sin q                     Equation 5

    Sy=-(X1 sin q+Y1 cos q)+X sin q-Y cos q                    Equation 6

Each of the sequencers 88,90 is operable to implement transformationsinvolving rotation and/or translation utilising the following generalfunctions:

    Sx=A+BX+CX.sup.2 +DY+EY.sup.2 +FXY                         Equation 7

    Sy=A'+B'X+C'X.sup.2 +D'Y+E'Y.sup.2 +F'XY                   Equation 8

where A to F and A' to F' are values specified by the user. Thus,Equations 5 and 6 are implemented to obtain the address Sx, Sy in shapebuffer 72 corresponding to the given point X,Y within the rectangle 170in workspace 70 by entering the following values into the sequencers88,90:

A=Y1sinq-X1cosq

B=cosq

D=-sinq

A'=-(X1sinq+Y1cosq)

B'=sinq

D'=cosq

All of C, E, F, C', E' and F' are set to zero.

Usually, the values obtained for Sx and Sy will not be whole numbers andthus will not represent an exact pixel address in shape buffer 72.Usually, therefore, a point such as point 172 which is between both therows and columns of pixels will correspond to point X,Y, the line 174 inFIG. 12 indicating this correspondence. The sequencers 88, 90 areprogrammed to read out, as indicated by arrow 176, from the frame buffer72 the four pixels 173, 175, 177 and 179 nearest to the point 172represented by the calculated Sx, Sy and to supply these to theinterpolator 100, to select interpolation coefficients from thecoefficient ROM 96 in dependence upon the position of the point 172relative to the four nearest pixels 173, 175, 177 and 179 and to supplythose coefficients to the interpolator 100 so that the interpolator 100derives an interpolated pixel value for comparison in comparator 122with the pixel value at point X, Y obtained from workspace 70 at thesame time. In order to obtain a value V for comparison with the valueobtained from the workspace 70, the interpolator 100 performs thefollowing calculation:

    V=(1-dx)(1-dy)V1+dx(1-dy)V2+(1-dx)dyV3+dxdyV4              Equation 9

In Equation 9, V1, V2, V3 and V4 are the values of the pixels 173, 175,177 and 179 respectively and, as shown in FIG. 12A, dx and dy arerespectively the fractional parts of the calculated co-ordinate valuesSx and Sy. The coefficients supplied from the coefficient store 96 tointerpolator 100 are therefore the coefficients of V1, V2, V3 and V4 ofEquation 9.

Thus, in operation, after the rectangle 170 has been transferred toworkspace 70, the sequencers 88, 90 operate to address each pixel in therectangle 170 in workspace 70 in turn in raster scan fashion bysequentially incrementing the X and Y addresses of the pixels in therectangle. As each new pixel is addressed in rectangle 170, thesequencers 88, 90 simultaneously perform Equations 5 and 6 utilisingthese values of X and Y to calculate the values Sx, Sy thereby to obtainthe corresponding value V as described above for comparison with thevalue in the pixel being read from the rectangle 170. In this mode ofoperation, the control register 130 is preset so that the comparator 122selects either the value V or the value of the pixel read from workspace70 according to which is the greater and the resulting value which hasbeen selected is returned through the graphics processor 54 to thecorresponding pixel position in layer 38d of overlay memory 38. Thus,after all pixels in rectangle 170 have been processed in this way, thecreation of the start segment 156 of the line between points X1, Y2 willhave been completed and the middle segment 160 can then be processed.

Processing of the middle segment 160 involves, firstly, identificationof a rectangle of pixels 178 in layer 38d of memory 38 just large enoughto contain the middle segment 160 and transfer of the Ko values thereinto workspace 70 as indicated by arrow 180 in FIG. 12. It will be seenfrom the upper part of FIG. 12 that there is some overlap between therectangles 170 and 178 as indicated at 182. Thus unless special stepsare taken, the pixels in the overlap area 182 will be processed twice.This can be minimised by clipping. This can be carried out in aconventional manner, which need not be described, utilising the TRWTMC2301 chips which constitute the sequencers 88,90 such that, whenprocessing rectangle 170 those pixels in the area 181 which are notwithin the rotated area of the start segment shape 156 are notprocessed, and such that when processing the rectangle 178, those pixelsin the overlap area 183 which are not within the area of the middlesegment 160 are not processed.

The processing of rectangle 178 after transfer thereof to the workspace70 is carried out in a similar manner to that described with referenceto rectangle 170 except that, firstly, the segment 162 representing thecross-section of the segment 162 is utilised instead of segment 156 and,secondly, since segment 162 is, in this embodiment, only a fraction ofthe length of segment 160, the calculations to obtain the values Sx,Syfor each address X, Y in rectangle 78 are performed in a manner to takethis into account. Thus, in this case, Sx and Sy are calculated bysequencers 88, 90 utilising the following equations: ##EQU1## where, aspreviously indicated L is the length of segment 160 and 1 is the lengthof segment 162.

Equations 10 and 11 can be rewritten as: ##EQU2## To implement equations12 and 13, the coefficients in Equations 7 and 8 are therefore set tothe following values: ##EQU3## The coefficients C, C', E, E', F and F'are all set to zero.

Thus, in FIG. 12, a point such as point 182 having co-ordinates X,Y inrectangle 178 is shown by line 184 as corresponding to a point 186having co-ordinates Sx, Sy in segment 162 in shape buffer 72. Sequencers80, 90, identify the four nearest neighbours to point 186, read thevalues of these pixels out to the interpolator 100 and supplyinterpolation coefficients as previously described so that theinterpolator may perform the interpolation of Equation 9. So that thisinterpolation can be performed, the length 1 of the segment 162 shouldbe at least two pixels.

As with the segment 156, the sequencers 88, 90 address each pixel inrectangle 178 in turn in raster scan fashion and the correspondingvalues for comparison therewith are supplied from interpolator 100.Again, the comparator 122 selects the larger of the two values and theselected value is returned to the corresponding location XY in layer 38dof memory 38. The performance of this process for all of the pixels inrectangle 178 may be regarded as a rotation and translation of segment162 to each successive position along segement 160 or alternatively maybe regarded as an extrusion of segment 162 from point X1,Y1 to pointX2,Y2.

After completion of the processing of rectangle 178, a rectangle 190just sufficiently large to contain the end segment 158 is identified inmemory 38 with the segement 158 rotated and positioned with the centreof the brush shape at point X2,Y2, the Ko values within the rectangle190 are transferred to workspace 70 and processing thereof with thevalues representing the segment 158 stored in the shape buffer 72 isperformed in the manner described in relation to rectangle 140 utilisingequations 5, 6 and 9. Upon completion of this process, therefore, thesegments 150, 158 and 160 will have been completed. Thereafter, the nextsection of line 164, i.e. that extending between points X2,Y2 and X3,Y3is drawn in exactly the same way. Although this involves overlapping ofthe new start section with the just calculated end section, thusinvolving some redundant processing, this does not affect the resultingline in view of the fact that always the larger value (in this process)is selected by the comparator 122.

From consideration of the above description and the drawings, it will beappreciated that the line 164 does not suffer from the problem that itis made up of a number of successive blobs and, furthermore,anti-aliasing is automatically achieved by the interpolation performedby interpolator 100. Display of the line 164 in the colour stored inlayers 38a, 38b and 38c of memory 38 is achieved by the mixing whichtakes place in mixer 40 and thus the line will appear on top of an imagecontained in memory 36 subject to any masking due to the Km values inmemory 36. Changing of the colour of the line can be easily achievedsimply by replacing the current colour stored in layers 38a to 38c ofmemory 38 with a new colour and thus, in this way, a complete colour ofa drawing made up of a number of lines such as line 164 can easily bechanged.

Particularly delicate effects can be achieved since the brush shapevalues are not combined with the previous pixel values but the larger ofthe two values is written back into the frame store 38 and thus, asdistinct from the conventional process, there is no "build-up" of"paint" when repeatedly drawing over the same area. Because there is no"build-up" with time, drawing and painting involving slow and carefulmovements of the stylus can be carried out without the slow movementresulting in increased deposition or build-up of "paint". Thus, delicatework can be much more easily carried out than with conventional systems.Further, "paint" removal can be achieved simply by resetting the controlregister 130 so that it causes the comparator 122 to select the smallerof the two values presented to it from workspace 70 and interpolator 100instead of the larger and this removal may be achieved with particularlydelicate control as will subsequently be described by adjustment of thepressure of the stylus.

In addition, lines can be created at much higher speed than conventionalprocesses because most pixels are not repeatedly processed in the linecreation system according to the preferred embodiment of the invention.Further, a trade-off against speed and costs may be achieved. That is tosay, for a given processing speed, cost can be substantially reducedcompared to prior art systems because less computing power is required.For a given computing power, speed, as already indicated, is increased.

TEXTURE

The texture buffer 74 is adapted for storing data to represent texture,such as the texture produced by painting a line with a hairy paint brushor drawing a line with chalk. In operation, the texture data in buffer74 is read out in synchronism with data from the shape buffer 72. Thetexture data is supplied to the interpolator 110 whose output issupplied to lo multiplier 118 via threshold generator 112 formultiplication with the data from interpolator 100. In this way, textureis superimposed on the brush shape stored in shape buffer 72 duringpainting and drawing operations. The affect of the texture data on thebrush shape is variable by adjusting the threshold added or substractedin threshold generator 112. The operation of the texture buffer will bemore fully understood from consideration of the following examples.

EXAMPLES 1

In this example, a streaky texture such as might be produced by a coarsebristled brush is to be superimposed on the line drawn utilising thebrush shape stored in shape buffer 72 to produce a streaky line. FIG. 13shows an example of such a line indicated by reference number 200 which,as shown, comprises four high intensity streaks 202, 204, and 208separated from each other by three low intensity streaks 210, 212 and214. Of course, in practice, there will normally be far more streaksproduced since there will be far more bristles but the number of streaksshown in the drawings is restricted for clarity and explanation.

FIG. 14 shows a three dimensional representation of the intensity of theline and it can be seen from this figure that the intensity of the outerstreaks 202 and 208 is less than that of the two central streaks 204 and206. If it is assumed that the brush shape stored in the shape buffer 72is as shown in FIG. 6, that is to say there is a high intensity centralregion and lower intensity outer region, the line of FIGS. 13 and 14 canbe produced by super-imposing thereon a texture as shown in FIG. 15comprising four peaks 202a, 204a, 206a and 208a of equal relatively highintensity with troughs 210a, 212a and 214a of equal, relatively lowintensity to between the peaks. This is because multiplication of thevalues representing the line drawn with the shape stored in the shapebuffer 72 with the values represented by the shape shown in FIG. 15 willproduce the shape shown in FIG. 14. Thus, in this example, datarepresenting the texture segment 216 of length 1 shown in FIG. 15 isstored in texture buffer 74 as illustrated in FIG. 16 which representsthis shape in a manner similar to representation of the shape in buffer72 in the lower portion of FIG. 12. The sequencers 102 and 104 whichcontrol the reading out of data from the texture buffer 74 are operatedin synchronism with the sequencers 88, 90 which control the reading outof data from the shape buffer 72. Assuming for simplicity that thelength 1 of the texture segment 216 and the segment 162 is equal to theradius of the brush shape, the texture segment 216 is read-out from thetexture buffer 74 in precisely the same manner as, and simultaneouslyand synchronously with, the reading out of the segments 156, 162 and158. That is to say simultaneously with the identification of, say,position 172 in FIG. 12, the corresponding position 172a is located inthe texture buffer 74 and the four nearest pixel values 176a, 178a, 180aand 182a are identified and read-out to the interpolator 108.Simultaneoulsy, sequencers 102 and 104 read-out coefficients from thecoefficient ROM 108 associated with the texture buffer and supply theseto the interpolator 110 so as to obtain the correct value for the point172a by interpolation utilising Equation 9. If the length of segment 218were different from that described above, an appropriate modification ofthe equations for addressing the texture buffer would be made.

Assuming for the moment that no off-set is applied by the thresholdgenerator 112, the output of the interpolator 110 is thus a sequence ofvalues with which the output of interpolator 100 is multiplied inmultiplier 118.

As already indicated, the function of threshold generator 112 is to addor substract an off-set value to the values output by interpolator 110.If an off-set value is added, the shape of segment 216 is essentiallychanged to that shown in FIG. 17 where segment 216 is shown as on top ofa block 218 representing the off-set value. The effect of this, aftermultiplication with the data from interpolator 100 is to produce astreaky line in which the overall brightness is increased but thecontrast between the bright and dark streaks is reduced therebyeffectively reducing the streakiness. In other words, the texturing isreduced.

If the threshold generator 112 is used to substract an off-set valuefrom the output of interpolator 110, the result is that the shape 216 ofthe FIG. 15 is effectively reduced to that shown as 216a in FIG. 18. Inthis figure, it can be seen that the values of the peaks and troughshave been reduced, the value of the troughs identified as 210b, 212b and214b being reduced almost to zero. The effect on the line which is drawnis to reduce the overall brightness but increase the streakiness. Thus,substracting an off-set from the texture, increases the texturing.

EXAMPLE 2

In certain artists implements, such as a hairy paint brush, the amountof paint on the brush decreases as the brush is used until the brush isagain recharged with paint. Thus, drawing a continuous line with a paintbrush will result in the line gradually getting fainter. An importantpreferred aspect of the invention provides a simple means forreproducing this effect. This is described with reference to FIGS. 19and 20.

FIG. 19 shows a texture shape 220 which comprises four peaks 222 andfour troughs 224 which are similar to the peaks and troughs shown inFIG. 15 but the segment 220 is substantially longer than that shown inFIG. 15, its length being indicated by the double headed arrow 226. Ascan be seen, the left hand end 220a of the texture shape 220 comprisesrelatively high intensity values whereas these values decrease graduallytowards the right hand end 220b at which they approach zero in whichcase, as will be recognised, the height difference between the peaks 222and troughs 224 may also gradually decrease along the length of thetexture shape 220. In this way, the texture shape 220 represents thedecreasing paint on a paint brush as the paint brush is used to paint aline. Data representing the texture shape 220 is stored in shape buffer74 as shown in FIG. 20. In operation in this example, the system isarranged so that the user can perform a control function indicative ofrecharging his brush with paint. This may, for example, involve bringingthe stylus 16 into contact with a predetermined portion (such as acorner portion) of the tablet 14, in which case several different suchportions may be provided to represent a palette for selecting differentcolours by touching the appropriate portion with the stylus 16.

Alternatively, for example, a signal indicative of recharging the paintbrush with paint may be generated by shaking the stylus 16 to activatethe inertia switch previously mentioned. In any event, upon generationof the signal indicative of recharging, painting a line is carried outby reading texture data from the texture shape 220 beginning at the end220a representing the brush fully recharged. As the line progresses,reading of the texture shape 220 progresses from left to right as shownin FIG. 20 until the right hand end 220b is reached. If at some pointsuch as point 220c part way along the stored shape 220, the stylus isremoved from the tablet and then drawing of the line resumed but withoutgenerating the recharging signal, reading of the texture shape isresumed from point 220c and again progresses to the right as shown inFIG. 20. Whenever the recharging signal is generated, however, readingof the texture shape 220 begins again at end 220a.

As with example 1, reading of the texture data is performed utilisingthe sequencers 102 and 104 which also output appropriate coefficientsfrom the coefficient ROM 108 to the interpolator 110. However, theequations for addressing the texture buffer to locate points Sx', Sy'corresponding to points X, Y in the work space 70 are modified comparedto the above equations for Sx and Sy as follows: ##EQU4## The term Ajwhose value is calculated by the equation above for An repeatedlyrepresents the length of the line which has been drawn since the lasttime the recharge signal was generated which of course corresponds tothe distance moved along the texture stored in the texture buffer. Ifthe value An exceeds the length of the stored texture, this isindicative of the implement having run out of paint and painting canonly be resumed by generation of a recharged signal.

With conventional painting using a real brush and paint, it is of coursepossible to recharge the brush with differing amounts of paint. This maybe replicated in the present invention by a modified form of rechargingin which, instead of creating a recharged signal as above describedwhich causes the texture buffer to be addressed at the left-hand end ofthe stored texture as illustrated in the drawings, recharged signals ofdifferent magnitude can be created to represent different positionsalong the texture, which different positions will represent differentamounts of paint on the brush. For example, programming may be providedwhereby generation of the recharge signal causes a value of Anrepresenting a position towards the right-hand end of the texture to becreated, the value being reduced by, for example, increasing thepressure on the stylus, maximum stylus pressure for example causing thevalue of An to be reduced to zero. In this way, recharging withdiffering amounts of paint may be simulated.

EXAMPLE 3

This example illustrates a further effect which is achievable with theinvention and which is believed to be completely new. It is describedwith reference to FIGS. 21 to 23.

FIG. 21 illustrates the shape buffer 74 having contained therein atexture shape 230 which, instead of being used to produce true texture,is to be used to reproduce the message "THIS MESSAGE CAN BE DRAWN IN ANYSHAPE". Thus, the pixel values of the shape 230 represent this message.In order to reproduce the message, utilising a brush shape stored inshape buffer 72, the appropriate signal corresponding to the abovedescribed recharge signal is generated and the stylus then drawn acrossthe tablet. This causes the shape 230 to be read-out beginning at theend 230a and ending at the end 230b. If, for example, the stylus ismoved in an inverted horseshoe shape, the message will be drawn in sucha shape as indicated by reference number 230c in FIG. 22. If, on theother hand, the stylus is moved along a somewhat S-shaped line asindicated by the reference number 230d in FIG. 23, the message isreproduced along a line of that shape. As will now be clear, the messagestored in shape buffer 74 can be reproduced in a single stroke in anyshape. Alternatively, it can be reproduced in segments, for example oneword at a time, by removing the stylus from the tablet and thenbeginning drawing again at a further position without generating therecharge signal.

Further, by appropriate choice of shape in the shape buffer 72, a bordermight be produced above and/or below the message. Also, the contrastbetween the characters making up the message and the background can beadjusted by appropriate choice of values in the shape 230 and/or byvariation in the off-set value provided by the threshold generator 112.

EXAMPLE 4

In Examples 2 and 3, the texture signals 220 and 230 stored in thetexture buffer 74 have been progressively read from one end to the otherand thereafter production of texture ceases until a recharge signal isgenerated. In an alternative example, the system can be arranged so thatwhen the right-hand end 220b or 230b of the texture signals is reached,the system automatically causes reading out of the texture signals tobegin again from the left-hand end as shown in the drawings. Thisarrangement is particularly suitable where the texture is representingan implement such as chalk, in which the amount of medium deposited doesnot decrease as the line is drawn. This re-reading of the texturesignals is achieved simply by detecting the condition that An exceedsthe length of the texture and then, in response to that detection,causing the texture to be re-read.

Utilizing this system, a message such as that shown in FIGS. 21 to 23can be automatically repeatedly generated without having to generate arecharge signal manually.

STRENGTH CONTROLLER

The strength controller 76 is operable to provide a signal which mayvary as a function of the co-ordinatates of the pixels being read fromworkspace 70 or 71 and, in the preferred embodiment, comprises a singleTMC2301 CMOS Image Resampling Sequencer made by TRW LSI Products Inc.and is therefore indentical to any one of the sequencers 88, 90, 102 and104. Accordingly, strength controller 76 is operable to implement thegeneral equation:

    P=A"+B"X+C"X.sup.2 +D"Y+E"Y.sup.2 +F"XY                    Equation 16

As previously, A" to F" are coefficients settable by the user and X andY are the X,Y addresses of the pixels being read from workspace 70and/or 71. Thus, since the output of the strength controller 76 iscombined with the output from interpolator 100 by multiplier 120, thefinal value of the signal output by multiplier 120 may varypixel-by-pixel dependent upon the signal from strength controller 76.This circuit configuration provides substantial advantages and enablesthe user to achieve a variety of effects. A number of examples will nowbe given.

EXAMPLE 5

In this example, the strength of the line being drawn using the linecreation process described above is caused to vary as a function of thepressure applied to the tip of the stylus 6. If, by way of example, thetip pressure at points X1,Y1 and X2,Y2 shown in FIG. 12 is respectivelyP1 and P2, the strength controller may generate a signal whose valuevaries linearly along the line 160 from a value representing pressure P1to a value representing pressure P2. It can be shown that the requiredpressure at any point X,Y along the line can be derived from thefollowing equation:

    P=a+b [(X-X1) cos q+(Y-Y1) sin q]                          Equation 17

where a=P1 ##EQU5## Equation 17 may be rearranged as follows:

    P=(a-b X1 cos q-b Y1 sin q)+b X+b Y                        Equation 18

Thus, in Equation 16 the coefficients are set to the following values:

A"=a-b X1 cosq-b Y1 sinq

B"=b

D"=b

C", E" and F" are set to zero.

Thus, in this way, smoothly varying intensity effects can be achieved bythe operator varying the pressure applied to the stylus. If, forexample, the operator starts a line with high pressure and graduallyreduces it, the intensity of the line will gradually decrease with thedecrease being smooth due to the interpolation which takes place betweensuccessive sensed positions of the stylus as described above. Thisvariation may be in addition to or instead of the variation in textureachieved in example 2 above.

TILTING AIR BRUSH

An important preferred embodiment of the invention reproduces the effectof tilting an air brush. This is described with reference to FIGS. 24 to26.

With reference to FIG. 24, the first step in the operation ofreproducing a tilted air brush is to store the selected paint colour inregister 116 and 10 store the basic air brush shape signals in the shapebuffer 72. FIG. 24 indicates such shape signals by reference number 500.As can be seen, the shape is circular and, therefore, the arrangement issuch that with the stylus 6 held perpendicular to the tablet 14, acircular blob would be produced on the TV monitor. The circular shape500 in FIG. 24 is shown as having a radius R and contained within arectangle 501 (in this case a square) whose width is designated as Swand height as Sh.

The upper portion of FIG. 24 represents a portion of the main screenmemory 36 and indicates a point 502 having co-ordinates X1,Y1 at whichthe stylus tip is detected. The circular shape 500 is shown in brokenlines and, as already will be apparent, indicates the spot which wouldbe produced if the stylus were perpendicular to the tablet. The systemis arranged so that the rotational orientation of the spot about itscentre varies with variation in r which is the angular orientation ofthe stylus about its own axis (see FIG. 1), i.e. r is the angle throughwhich the stylus has been rotated about its own axis relative to a datum(not shown). Thus, the spot can be rotated about its own centre byrotating the stylus about its own axis but this will not be visible ifthe shape 500 stored in the shape buffer is symmetrical about the centrepoint as will normally be the case when implementing an air brush.Assuming, that the stylus is tilted, the processing according to thisembodiment of the invention will change the shape of the spot producedto that approximating an ellipse 504 having a central point 506, thelength of the major axis 507 of the ellipse being dependent upon theangle u (FIG. 1) and the direction thereof being dependent upon theangle v (FIG. 1).

In order to produce the elliptical shaped spot 504, the system isprogrammed, having detected the position X1,Y1 and the angle u, v and r,to identify a rectangle of pixels 508 which contains the ellipticalshape 504. The rectangle 508 is as small as possible and derivationthereof will be described in detail later with reference to FIGS. 25 and26. After identification of the rectangle 508, the pixel values thereinare, as indicated by arrow 510, transfered to workspace 70 in the brushprocessor. In this example, the Rm, Bm and Gm values in memory 36 aretransferred since, in this example, air brushing onto an exsitingbackground or picture in memory 36 is to be performed.

Having stored the rectangle 508 in workspace 70, the values therein areread out in raster scan fashion and linearly interpolated with thecolour values in register 116 utilising values derived from the shape500 stored in the shape buffer 72 as the interpolation co-efficients.The addressing of the shape buffer 72 is performed in a manner whichprovides the required transformation of the circle 500 into the ellipse504. Thus, for a given pixel of address XY in the workspace 70, acorresponding address Sx,Sy is determined in the shape buffer 72utilising the sequencers 88 and 90. More particularly, as in previousexamples, the following equations are used:

    Sx=A+Bx+dy

    Sy=A'+B'x+D'y

The values of the co-efficients A, B, D and A', B', D' for transformingthe circle to an ellipse may be calculated utilising the followingequations: ##EQU6## In these equations, the angles u, v and r are asshown in FIG. 2 (although, as indicated, if the shape 500 is symmetricalabout its centre variation in r will not produce a visible effect) thevalues Sw and Sh are as shown in FIG. 24 and: ##EQU7## The interpolator100 operates as previousl described where Xb,Yb have the meanings shownin FIG. 24.

It is also preferable that the strength controller 76 should be operatedin this embodiment to cause pixels closer to the tip of the stylus tohave a greater strength than those more remote therefrom. This willproduce a substantially enhanced effect and is conveniently achieved bycausing the signal P produced by the strength controller to be inaccordance with the following equation:

    P=a'+b'[(x-Xe) cos v+(y-Ye) sin v]

where ##EQU8## where Xe and Ye are the co-ordinates of the point 506 andPo is the signal indicative of stylus pressure.

In the above equations, the denominator of the equation for b' can incertain circumstances equal zero. The software is arranged so that ifthis condition should arise, the output of the strength controller 76will be set to be equal to Po and will remain constant at that value solong as the condition mentioned persists.

In this way, an air brush can be replicated in a manner which is a majorimprovement over the prior art since not only does the shape of the spotproduced vary with angle of tilt but the elongated shape produced hasits center 506 shifted relative to the position of 502 of the stylus tipthus giving a realistic "feel" and, further, the strength of the pixelsreduces with distance from the stylus tip giving a highly realisticeffect.

Although in the example given, the circular shape has been elongated toan elliptical shape, it is also possible to expand the circular shape inother ways, for example, to create a fanning out thereof.

Thus, by way of summary, this embodiment involves identifying therectangle 508, transferring the pixel values thereof (Rm, Gm, Bm) to theworkspace 70, addressing the shape buffer 72 to expand the shape thereinin dependence upon the tilt of the stylus and derive interpolationco-efficients, interpolating the selected paint colour with the pixelsin rectangle 508 in workspace 70 and storing the results of theinterpolation in the pixels of rectangle 508 within frame store 36.

Identification of rectangle 508 in frame store 36 may be achieved asshown in FIG. 25 and 26.

FIG. 25 shows the shape 500 with its centre 502 at a pixel in memory 36having co-ordinates X1,Y1, and the square 501 which just contains thecircle 500. The line 507 (which as will be recognised also designatesthe major axis of the ellipse to be formed) passes through the point 502and is at an angle v (not shown in FIG. 25) to the x axis.Identification of the rectangle 508 involves:

1. Notional rotation of the square 501 about the centre point 502through an angle v as shown by arrows 520 to bring a diagonal 522 of thesquare 501 into coincidence with the line 507. This will bring corners524 and 526 of the square into coincidence with the line 507 and corners528 and 530 to the positions 528a and 530a.

2. Notional stretching of the reorientated square along the axis 507 byan amount dependent upon the angle u, i.e. the angle of tilt, to bringthe points 524 and 526 to positions 524a and 526a. Thus, the spacingbetween points 524a and 526a is a function of the tilt angle and in turnthe length of the major axis of the ellipse 504 which is eventuallyproduced on the screen will increase as the angle u increases.

3. The definition of the rectangle 508 as the smallest rectangle whichhas its sides parallel to the x and y axes and which can contain thediamond shape 500a whose apices are the point 524a, 526a, 528a and 530aas within which the ellipse 504 is to be contained.

If the rectangle 508 were left in the position shown in FIG. 25, thepoint 502 which corresponds to the tip of the stylus would be positionedmid-way along the major axis 507 of the ellipse 504. Thus the effectwould differ from the effect produced by a real tilted air brush inthat, with a real tilted air brush, most of the elongated spot producedwill be ahead of rather than behind the air brush. Thus, to improve therealism, the step shown in FIG. 26 is carried out in which the rectangle508 is translated along the axis 507 through a distance indicated byarrow 532 to bring its centre from the position 502 having co-ordinatesX1,Y1, at which the stylus tip is located, to a position 534 having theco-ordinates Xe,Ye. The distance through which the rectangle istranslated may be selected by the operator or designer of the system buta preferred distance is such that the point 502 is spaced by thedistance R from the point 536 where the major axis 507 intercepts theellipse 504, where R is the radius of the circle 500. Of course, thisdoes not have to be exact.

It should be understood that although in FIG. 25, the four points 524a,526a, 528a and 530a at the apices of the diamond shape 500a all fall onthe rectangle 508, this will not always be the case. As stated, therectangle 508 is selected so as to be the minimum rectangle which willcontain the diamond shape 500a.

Suitable equations for rotating the square 501 and expanding it to formthe diamond 501a are set out below, where X,Y are the co-ordinates ofthe corners of the square 501 and X',Y' are the co-ordinates of thecorners of the diamond 501a. The equations are: ##EQU9##

Although in the example just described, it may be assumed that the shape500 is symmetrical about its centre, this is not necessary. The shapeneed not be a circle and it may, in itself, constitute a picture of anobject as a result of which rotation of the stylus about its own axiswill result in rotation of the image of the object about the pointcorresponding to the tip of the stylus. Thus, in addition to replicatinga tilted air brush, the example as described with reference to FIGS. 24to 26 may be used for producing special effects in which the shape of animage is expanded as a function of stylus tilt and rotated as a functionof stylus rotation about its own axis.

VARIATIONS

Various modifications are possible within the scope of the invention.

One modification would be to the process described with reference toFIGS. 6 to 12. In a modification thereof, instead of storing the twopart shapes 156 and 158, it will be possible just to store the completeshape shown in FIG. 6 and to use this both at the beginning and end ofeach segment 160. This would involve some redundant processing. Further,instead of storing both shapes 156 and 158, it would be possible just tostore one of them in the shape buffer and to rotate that single shape toone orientation for use as the start segment and to the oppositeorientation for use as the end segment.

Although, in the description of FIG. 12, the line 164 has been drawn byraster scanning the various rectangles 170, 178 and 190 corresponding tothe start, middle and end segments of the line portions, it wouldinstead be possible to write the data representing the line segmentsinto the layer 38d of memory 38 in blocks of pixels, i.e. in"sub-rectangles".

It is preferable that the line creation process should be arranged sothat if the stylus is held in the same position, the entire brush shape,rather than just a segment of it, will be written.

Although the prefered form of stylus and tablet is as described withreference to FIG. 2, other forms are possible. For example, certainembodiments of the invention can be implemented with a tablet and stylusin which there is no provision for sensing stylus tilt and/or forsensing stylus rotation about its own axis.

Although the TRW chips identified in the description of the drawings arepreferred for implementation of the various circuits described, this isnot essential. The various functions performed by these chips could,instead, be implemented in software, for example, or by otherprogrammable hardware circuits.

It should be understood that the brush shape shown in FIG. 6 is just onesimple example. In practice, many different brush shapes may be providedand the brush shape itself may, for example, actually constitute apicture of an object.

The shape and texture buffers illustrated in the drawings may beimplemented as separate memories or, alternatively, may be implementedas different portions of a single memory which may also contain othermemory space such as memory space representing the workspaces 70, 71.

If desired, a tablet and stylus could be utilized having means forsensing the distance of the stylus from the tablet and the signalrepresenting this distance could be employed for modifying the shape ofthe patch of image signals produced and/or translating that shape, forexample when simulating an air brush.

The above indicates only a few modifications to certain embodiments ofthe invention. Many others are possible.

We claim:
 1. A method of generating a line so that the generated linesimulates the result of a moving painting or drawing implement, saidmethod comprising:a) providing first shape signals representative of atleast part of a selected implement shape and second shape signalsrepresentative of a cross-sectional portion of said implement shape; b)determining first and second positions between which said line is to begenerated; and c) generating said line utilising said first shapesignals in a set of regions of said first and second positions and saidsecond shape signals for creating a segment in a region between saidfirst and second positions, and wherein the shape signals representmultiple pixels in both length and width and are rotated to matchchanges in the angle of said line.
 2. A method according to claim 1,wherein said first shape signals are provided in two separate parts, afirst part representing a start segment of said line and the second partrepresenting an end segment of said line.
 3. A method according to claim2, wherein said first part of said first shape signals represents onehalf of said implement shape and said second part represents the otherhalf of said implement shape.
 4. A method according to claim 1, whereinsaid first shape signals represent the whole of the implement shape. 5.A method according to any of claims 1 to 4, wherein said shape signalsare provided by being stored in a shape buffer and read therefrom.
 6. Amethod according to claim 1, wherein said second shape signals representa cross-section of short length and said cross-section is extruded toform the portion of the line in said region between said first andsecond positions.
 7. A method according to claim 1, includingprovidingsignals representative of texture; and combining said texture signalswith said shape signals, whereby a line having texture defined by saidtexture signals is generated.
 8. A method according to claim 7, whereinsaid texture signals are stored in a texture buffer and read therefromfor combination with said shape signals.
 9. A method according to claim7, wherein said texture signals represent a short length of texture andwherein said short length of texture is extruded for the generation ofsaid line.
 10. A method according to claim 7, wherein said texturesignals represent a long length of texture and are providedprogressively along said length.
 11. A method according to claim 10,wherein said length of texture simulates the running out of drawing orpainting medium.
 12. A method according to claim 7, wherein saidcombination of said texture signals with said shape signals is amultiplication.
 13. A method according to claim 1, including means foradjusting the magnitude of the shape signals as they are provided as afunction of the addresses of the pixels to which they relate.
 14. Amethod according to claim 1, wherein a background on to which said lineis to be drawn or painted is in a first memory, a colour with which theline is to be drawn or painted is provided in a second memory and saidshape signals are provided as coefficients associated with said secondmemory for controlling the mixing of the colour therein with thebackground in the first memory.
 15. A method according to claim 14,wherein, during said line generation, coefficients associated with saidsecond memory are only replaced by new values derived from said shapesignals if the values derived from the shape signals are larger than thevalue of the coefficients already stored.
 16. A method as in claim 1,wherein said steps of providing, determining, and generating areconducted responsive to receipt of a signal from a drawing tool.
 17. Amethod as in claim 1, wherein said steps of providing, determining, andgenerating are conducted responsive to a signal from a drawing tool,said signal comprising a plurality of discrete spaced apart positions ofsaid drawing tool, whereby said method generates a substantiallycontinuous line in response to said plurality of discrete spaced apartpositions of said drawing tool.
 18. A method as in claim 1, wherein saidsteps of providing, determining, and generating are conductedsubstantially in real time with regard to a signal from a drawing tool.19. Graphics apparatus for generating a line so that the generated linesimulates the result of a moving painting or drawing implement, saidapparatus comprising:a) means for providing first shape signalsrepresentative of at least part of a selected implement shape and secondshape signals representative of a multiple pixel cross-sectional portionof said selected implement shape; b) means for determining first andsecond positions between which a line is to be generated; and c) meansfor generating a line utilising said first shape signals in a region ofsaid first and second positions and utilising said second shape signalsfor creating a segment in a region between said first and secondpositions.
 20. Apparatus according to claim 19, further comprising ashape buffer for storing said first or second shape signals. 21.Apparatus according to claim 19, comprising means for providing texturesignals representative of texture and for combining said texture signalswith said first or second shape signals in order to generate a linehaving texture defined by said texture signals.
 22. Apparatus accordingto claim 21, comprising a texture buffer for storing said texturesignals.
 23. Apparatus according to claim 19, comprising means foradjusting a magnitude of said first or second shape signals as they areprovided in response to a set of addresses of pixels to which theyrelate.
 24. Apparatus according to claim 19, comprisinga first memoryfor storing a background onto which said line is to be drawn or painted;a second memory for storing a color with which the said line is to bedrawn or painted; and means for providing said first or second shapesignals as coefficients associated with said second memory forcontrolling the mixing of the colors therein with the background in thefirst memory.
 25. A method of generating a line, said methodcomprisinga) storing signals representative of a variation in firstline, said variation simulating one produced by an implement of a typein which a produced line varies in response to a position along saidfirst line; and b) generating said produced line by utilizing saidstored signals in response to said position along said first line,whereby said produced line simulates said variation.
 26. Apparatus forgenerating a line so that the generated lines simulate the result of amoving painting or drawing implement, said apparatus comprising:a) meansfor providing shape signals representative of a shape of a drawing orpainting implement; b) means for providing texture signalsrepresentative of texture of a line generated by said drawing orpainting implement; and c) means for combining said shape and saidtexture signals; and d) means utilizing said combined signals forgenerating a line having characteristics defined by both said shape andsaid texture signals.
 27. Apparatus for generating lines so that thegenerated lines simulate the result of a moving painting or drawingimplement, said apparatus comprising:a) means for storing an image, saidimage comprising a plurality of pixels; b) means for providing shapesignals representative of an implement for drawing a line; c) means fordrawing said line by altering said pixels in response to image signalsderived utilizing said shape signals; and d) means for adjusting amagnitude of said image signals supplied to said pixels in response to aset of addresses of said pixels so as to simulate the variations whichwould be generated by an actual drawing or painting implement.
 28. Amethod of generating images utilizing an electronic stylus, said methodcomprisinga) carrying out drawing movements with the stylus; b)electronically sensing a position and tilt of the stylus; c) generatinga patch of image signals in a location in response to the position ofthe stylus; d) adjusting a size or shape of the patch as a function ofthe tilt of the stylus; and e) altering the position of the patch inresponse to the tilt of the stylus.
 29. A method according to claim 28,wherein said patch simulates the patch produced by a tilted air brush.30. A method according to claim 28, including providing:a) first shapesignals representative of at least part of a selected implement shapeand second shape signals representative of a cross-sectional portion ofsaid implement shape; b) determining first and second positions betweenwhich said line is to be generated; and c) generating said lineutilising said first shape signals in a set of regions of said first andsecond positions and said second shape signals for creating a segment ina region between said first and second positions.
 31. A method accordingto claim 30, wherein said first shape signals are provided in twoseparate parts, a first part representing a start segment of said lineand the second part representing an end segment of said line.
 32. Amethod according to claim 30 including providing signals representativeof texture; and combining said texture signals with said shape signalswhereby a line having texture defined by said texture signals isgenerated.
 33. A method according to claim 28 comprising:a storingsignals representative of a variation in a first line, said variationsimulating one produced by an implement of a type in which a producedline varies in response to a position along said first line; and b)generating said produced line by utilising said stored signals inresponse to said position along said first line, whereby said producedline simulates said variation.
 34. Apparatus for producing a patch ofimage signals which simulates a tilted air brush, said apparatuscomprisinga) means for storing shape signals; b) means for producing agroup of image signals utilizing said shape signals, said group having aselected shape; c) a stylus for defining a position of the patch; d)means for sensing a tilt of the stylus; e) means for modifying the shapeof the group or altering the group in response to the tilt of thestylus.
 35. A method of generating an image in a frame store, saidmethod comprisinga) providing a set of first signals representing ashape with which drawing or painting is to be performed; b) providing aset of second signals, said set of second signals being representativeof a sequence having a predetermined length, and said signals in saidset of second signals varying in response to a parameter proportionateto said length to provide predetermined features in said image; and c)creating said image utilizing said first signals and progressivelyutilizing signals from said set of second signals, said first signalsand said second signals being combined prior to creation of the image inthe frame store.
 36. A method according to claim 35, wherein said set ofsecond signals represents texture.
 37. A method according to claim 35,wherein said set of second signals contains a representation of a set ofcharacters.
 38. A method of generating a line, said method comprising:a)providing first shape signals representative of at least part of aselected implement shape and second shape signals representative of across-sectional portion of said implement shape; b) determining firstand second positions between which said line is to be generated; c)providing signals representative of texture; d) generating said lineusing said first shape signals in a set of regions of said first andsecond positions and said second shape signals for creating a segment ina region between said first and second positions, said texture signalsbeing combined with said shape signals whereby the line is generatedhaving a texture defined by said texture signals wherein said texturesignals represent a long length of texture and are providedprogressively along said length, said length of texture simulating therunning out of a drawing or painting medium.
 39. A method of generatinga line, said method comprising:a) providing first shape signalsrepresentative of at least part of a selected implement shape and secondshape signals representative of a cross-sectional portion of saidimplement shape; b) determining first and second positions between whichsaid line is to be generated; c) storing a background onto which saidline is to be drawn or painted in a first memory; d) storing a colorwith which the line is to be drawn or painted in a second memory; and e)generating said line utilising said first shape signals in a set ofregions of said first and second positions and said second shape signalsfor creating a segment in a region between said first and secondpositions, said shape signals being provided as coefficients associatedwith said second memory for controlling the mixing of the color thereinwith the background in the first memory, wherein during said linegeneration, coefficients associated with said second memory are onlyreplaced by new values derived from said shape signals if the valuesderived from the shape signals are larger than the values of thecoefficients already stored.